import request from "../utils/request.js";

export function checkUsername(userName){
    return request({
        url: '/register/check',
        method: 'get',
        params: {
            userName
        }
    })
}

export function sendEmailCode(email){
    return request({
        url: '/register/sendCode',
        method: 'get',
        params: {
            email
        }
    })
}

export function registerUser(data){
    return request({
        url: '/register',
        method: 'post',
        data: {
            ...data
        }
    })
}
